﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Caifu.Pres;

namespace Caifu.Spiders
{
	class Utils
	{
		public static IList<PreNetValueThird> ConvertToPreNetValueThirds(IList<NetValueItem> items, string source)
		{
			List<PreNetValueThird> list = new List<PreNetValueThird>();

			foreach (var item in items)
			{
				PreNetValueThird third = new PreNetValueThird();
				third.FundCode = item.FundCode;
				third.ReportDate = item.ReportDate;
				third.UnitNetValue = item.UnitNetValue;
				third.AccumulatedNetValue = item.AccumulatedNetValue;
				third.Source = source;

				list.Add(third);
			}

			return list;
		}
	}
}
